package com.dbpms.pj.sys.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/")
public class PageController {

    /**
     * 返回主页页面
     * @return
     */
    @RequestMapping("doIndexUI")
    public String doIndexUI(){
        return "starter";
    }

    /**
     * 返回分页页面页脚公共部分，由各个分页页面调用
     * @return
     */
    @RequestMapping("doPageUI")
    public String doPageUI() {
        return "common/page";
    }

    /**
     * 返回log分页面
     * @return
     */
    @RequestMapping("log/log_list")
    public String doLogUI() {
        return "sys/log_list";
    }

    @RequestMapping("/menu/{moduleUI}")
    public String doModuleUI(@PathVariable String moduleUI) {
        return "sys/" + moduleUI;
    }

    @RequestMapping("/role/{moduleUI}")
    public String doRoleUI(@PathVariable String moduleUI) {
        return "sys/" + moduleUI;
    }

    @RequestMapping("/dept/{moduleUI}")
    public String doDeptUI(@PathVariable String moduleUI) {
        return "sys/" + moduleUI;
    }

    @RequestMapping("/user/{moduleUI}")
    public String doUserUI(@PathVariable String moduleUI) {
        return "sys/" + moduleUI;
    }

    @RequestMapping("/doLoginUI")
    public String DoLoginUI(){
        return "login";
    }
}